-- 创建账户
create table account (
	id bigint primary key auto_increment,
	name varchar(20) unique,
	balance decimal(9,2)
);

insert into account values (null, '张三', 1000), (null, '李四', 1000);

select * from account;

-- 开启事务 begin / start transaction
begin;
update account set balance = balance - 100 where name = '张三';
update account set balance = balance - 100 where name = '张三';













